/**
 * created by dqn 2018/3/7
 */

package main.repository;

import main.entity.WebUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.Optional;

@Repository
@Transactional
public interface WebUserRepository extends CrudRepository<WebUser, Integer> {
    public Optional<WebUser> getWebUserByNumberAndPassword(String number, String password);

    public Optional<WebUser> getWebUserByNumber(String number);

    public Optional<WebUser> getWebUserByPk(int pk);

    public Page<WebUser> findAll(Pageable pageable);

}
